<template>
    <div class="container">
        <div class="header">
            <div class="header-left">
                <div class="header-left-avatar">
                    <van-image round fit="cover" width="45" height="45" :src="require('../assets/image/avatar.png')" />
                </div>
                <div class="header-left-info" @click="goToUserInfo">
                    <div class="header-left-info-phone">
                        <span>您好,{{ maskedPhone }}</span>
                    </div>
                    <div class="header-left-info-text">
                        <span>点击查看个人信息 ></span>
                    </div>
                </div>
            </div>
            <div class="header-history">
                <div class="report-record-left">
                    <span>0</span>
                    <span>举报记录</span>
                </div>
                <span>|</span>
                <div class="report-record-right">
                    <span>0</span>
                    <span>报案记录</span>
                </div>
            </div>
        </div>
        <div class="body">
            <div class="body-includes">
                <div class="feedback">
                    <i class="iconfont icon-icon_fankuiyubangzhu"></i>
                    <span>反馈与帮助</span>
                    <i class="iconfont icon-youjiantou"></i>
                </div>
                <div class="about">
                    <i class="iconfont icon-guanyuwomen"></i>
                    <span>关于我们</span>
                    <i class="iconfont icon-youjiantou"></i>
                </div>
                <div class="user-manual">
                    <i class="iconfont icon-ico_yonghushouce"></i>
                    <span>用户手册</span>
                    <i class="iconfont icon-youjiantou"></i>
                </div>
                <div class="setting">
                    <i class="iconfont icon-shezhi"></i>
                    <span>设置</span>
                    <i class="iconfont icon-youjiantou"></i>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'Mine',
    data() {
        return {
            phone: '12345678900',
        }
    },
    methods: {
        goToUserInfo() {
            this.$router.push('/user-info')
        }
    },
    computed: {
        maskedPhone() {
            return this.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1xxxx$2')
        }
    }
}
</script>

<style lang="less" scoped>
@import url('//at.alicdn.com/t/c/font_4414697_d59hpa9plzv.css');
.container {
    height: 100vh;
    position: relative;
    background-color: #f4f4f4;

    .header {
        height: 188px;
        width: 100%;
        box-sizing: border-box; //盒子模型
        background-color: #3b53fd;
        border-bottom-left-radius: 25%;
        border-bottom-right-radius: 25%;

        .header-left {
            display: flex;
            height: 70px;
            align-items: center;

            .header-left-avatar {
                padding-left: 20px;
            }

            .header-left-info {
                padding-left: 10px;

                .header-left-info-phone {
                    font-size: 16px;
                    color: #ffffff;
                }

                .header-left-info-text {
                    padding-top: 5px;
                    font-size: 12px;
                    color: #ffffff;
                }
            }
        }

        .header-history {
            display: flex;
            justify-content: space-around; //平均分配
            height: auto;
            line-height: normal;
            font-size: 12px;
            color: #ffffff;
            background-color: #3b53fd;

            .report-record-right,
            .report-record-left {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                height: 100%;
                margin: 0 0 0 30px;
            }

            .report-record-right {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                height: 100%;
                margin: 0 30px 0 0;
            }
        }
    }
    .body {
        position: absolute; // 设置为绝对定位
        top: 18%; // 调整这个值来改变 body 盒子的位置
        width:256px;
        height: 200px;
        background-color: #fff; // 设置背景颜色
        margin: 0 45px;
        padding: 10px;
        border-radius: 33px;
        .body-includes {
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            height: 100%;
            padding: 10px;
            .feedback,
            .about,
            .user-manual,
            .setting {
                display: flex;
                justify-content: space-between;
                align-items: center;
                height: 40px;
                font-size: 14px;
                color: #000000;
                border-bottom: 1px solid #f4f4f4;
            }
        }
    }
}




</style>